<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>首页</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 8]>
    <script>
        alert('H+已不支持IE6-8，请使用谷歌、火狐等浏览器\n或360、QQ等国产浏览器的极速模式浏览本页面！');
    </script>
    <![endif]-->

    <link href="/static/admin/public/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/static/admin/public/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="/static/admin/public/css/animate.min.css" rel="stylesheet">
    <link href="/static/admin/public/css/style.min.css?v=3.2.0" rel="stylesheet">

</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <a class="dropdown-toggle" >
                            <span class="clear">
                                <span class="block m-t-xs"><strong class="font-bold">管理系统</strong></span>
                                <!--                                <span class="text-muted text-xs block">超级管理员<b class="caret"></b></span>-->
                            </span>
                        </a>
                    </div>
                    <div class="logo-element">展开
                    </div>
                </li>
                <li>
                    <a class="J_menuItem" href="/admin/index/welcome">
                        <i class="fa fa-magic"></i>
                        <span class="nav-label">主页</span>
                    </a>
                </li>
                <li v-show="isShowNav('1')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">账号管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/admin/index" data-index="0">账号列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/admin/add" data-index="0">新增账号</a>
                        </li>
                    </ul>

                </li>
                <li v-show="isShowNav('2')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">会员管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/member/index" data-index="0">会员列表</a>
                        </li>
                    </ul>

                </li>
                <li v-show="isShowNav('3')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">分类管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/trade/index" data-index="0">大类列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/trade/childList" data-index="0">二级分类</a>
                        </li>
                    </ul>

                </li>
                <li v-show="isShowNav('4')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">货源招标</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/freight/index" data-index="0">货源招标列表</a>
                        </li>
                    </ul>
                </li>
                <li v-show="isShowNav('5')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">文章管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/content/index" data-index="0">文章列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/content/add" data-index="0">添加文章</a>
                        </li>
                    </ul>

                </li>

                <li v-show="isShowNav('6')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">新闻管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/news/index" data-index="0">新闻列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/news/add" data-index="0">添加新闻</a>
                        </li>
                    </ul>

                </li>
                <li v-show="isShowNav('7')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">公告管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/notice/index" data-index="0">公告列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/notice/add" data-index="0">添加公告</a>
                        </li>
                    </ul>
                </li>
                <li v-show="isShowNav('8')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">链接管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/link/index" data-index="0">链接列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/link/add" data-index="0">添加外链</a>
                        </li>
                    </ul>
                </li>
                <li v-show="isShowNav('9')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">广告管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/advertising/index" data-index="0">广告列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/advertising/add" data-index="0">添加广告</a>
                        </li>
                    </ul>
                </li>
                <li v-show="isShowNav('10')">
                    <a href="index.html#">
                        <i class="fa fa-file-excel-o"></i>
                        <span class="nav-label">banner管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="/admin/banner/index" data-index="0">banner列表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="/admin/banner/add" data-index="0">添加banner</a>
                        </li>
                    </ul>
                </li>
                <li v-show="isShowNav('11')">
                    <a class="J_menuItem" href="/admin/message/index">
                        <i class="fa fa-magic"></i>
                        <span class="nav-label">留言管理</span>
                    </a>
                </li>

            </ul>
        </div>
    </nav>

    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="index.html#"><i class="fa fa-bars"></i> </a>
                </div>

            </nav>
        </div>
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active J_menuTab" data-id="index_v1.html">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

                </button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
            <a href="/admin/logout/index" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/admin/index/welcome" frameborder="0" data-id="/admin/content/index" seamless></iframe>
        </div>
<!--        <div class="footer">-->
<!--            <div class="pull-right">&copy; 2014-2015 <a href="../../index.html" target="_blank">zihan's blog</a>-->
<!--            </div>-->
<!--        </div>-->
    </div>
    <!--右侧部分结束-->
    <!--右侧边栏开始-->


</div>
<style>
    * {
        touch-action: pan-x;
    }
</style>
<!-- 全局js -->
<script src="/static/admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/static/admin/public/js/bootstrap.min.js?v=3.4.0"></script>
<script src="/static/admin/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/admin/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/admin/plugins/layer/layer.min.js"></script>
<script type="text/javascript" src="/static/vue/vue.js"></script>


<!-- 自定义js -->
<script src="/static/admin/public/js/hplus.min.js?v=3.2.0"></script>
<script type="text/javascript" src="/static/admin/public/js/contabs.min.js"></script>
<script type="text/javascript" src="/static/util/axios.min.js"></script>
<script type="text/javascript" src="/static/admin/api/require.js"></script>
<script type="text/javascript" src="/static/admin/api/publicAjax.js"></script>

<!-- 第三方插件 -->
<script src="/static/admin/plugins/pace/pace.min.js"></script>
<script src="/static/toastr/toastr.min.js"></script>
<script src="/static/toastr/customToastr.js"></script>

<script src="/static/admin/plugins/validate/jquery.validate.min.js"></script>
<script src="/static/admin/plugins/validate/messages_zh.min.js"></script>
<script>
    var id = '{$id}'
    console.log(id)
    var navSelectVm = new Vue({
        el:'#side-menu',
        data:{
            ruleList:[],
            id:id
        },
        methods:{
            getRuleList:function () {
                var el = this
                var postData = {
                    'id':el.id
                }
                AjaxPost(postData,'/admin/index/getAdminByWhere').then((response)=>{
                    if(response.result.rule){
                        el.ruleList = response.result.rule.split(',')
                    }
                    console.log(el.ruleList)
                })
            },
            isShowNav:function (num) {
                var el = this
                var num = num
                if(el.ruleList.indexOf(num)>-1){
                    return true
                }else {
                    return false
                }
            }
        },
        mounted(){

           this.$nextTick(function () {
               this.getRuleList()
           })
        }
    })
</script>
</body>

</html>